package com.zyh.homework.yichangzuoye.test1;

import java.util.Scanner;

public class Test {
    public static final Scanner INPUT = new Scanner(System.in);

    public static void main(String[] args) throws MyRuntimeException {
        System.out.println("请输入分数：");
        int score = INPUT.nextInt();
        if (score > 100 || score < 0) {
            throw new MyRuntimeException("分数必须在0-100之间");
        } else {
            System.out.println("score = " + score);
        }
    }
}

class MyRuntimeException extends RuntimeException {
    public MyRuntimeException() {
    }

    public MyRuntimeException(String message) {
        super(message);
    }
}
